]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dateMenu: Fix missing text style for no locations state
authorSam Hewitt <snwh@gnome.org>
Tue, 6 Feb 2024 15:54:38 +0000 (12:24 -0330)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 6 Feb 2024 19:54:04 +0000 (19:54 +0000)
- add class to the header when there are no locations so the text appears clickable

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3169>

data/theme/gnome-shell-sass/widgets/_calendar.scss
js/ui/dateMenu.js

index 028318e25f6071b754a82eb22deb997edd36b3fd..f34e59110d8ca64dba15462f5deb3080c1a09736 100644 (file)
         @extend %heading;
         color: $insensitive_fg_color;
 
+         // change style when no location is configured
+        &.no-location {
+          color: $fg_color;
+        }
+
         &.location {
           font-weight: normal;
         }
index d731c10346bd53731c30e59d2a325e24aea4390b..d09eabc3e4c3464dbe47fdece8b768621e8f3f1a 100644 (file)
@@ -727,6 +727,11 @@ class WeatherSection extends St.Button {
         else
             this._titleLabel.text = _('Select weather location…');
 
+        if (this._weatherClient.hasLocation)
+            this._titleLabel.remove_style_class_name('no-location');
+        else
+            this._titleLabel.add_style_class_name('no-location');
+
         this._forecastGrid.visible = this._weatherClient.hasLocation;
         this._titleLocation.visible = this._weatherClient.hasLocation;